package cocurrency.callable;

import java.util.Random;
import java.util.concurrent.Callable;

/**
 * Created by luzl on 4/6/2017.
 */
public class CallableThread implements Callable<Integer> {
    @Override
    public Integer call() throws Exception {
        int random= new Random().nextInt(1000);
        System.out.println("Executing, "+random);
        Thread.currentThread().sleep(1000);
        return new Integer(random);
    }
}
